<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:s="http://jboss.com/products/seam/taglib">
<head>
<title>Insert title here</title>
</head>
<body>
<f:view contentType="text/html">
	<s:remote include="seamMgr,news" />

	<script type="text/javascript">
    //<![CDATA[
    
    function sayHello() {
      var name = prompt("What is your name?");
      Seam.Component.getInstance("seamMgr").getUser(name, sayHelloCallback);
    }

    function sayHelloCallback(result) {
      alert(result.name);
    }

    // ]]>
  </script>

	<button onclick="javascript:sayHello()">Say Hello</button>
	<h:form>
		<h:inputText value="#{news.topic}"></h:inputText>
		<h:inputText value="#{news.content}"></h:inputText>
		<h:commandButton action="#{newsAction.addNews}" value="添加新闻"></h:commandButton>
	</h:form>
</f:view>
</body>
</html>